/*
* ECARX Technology Limited is the owner of the copyright and the trade secret of this software.
* Without permission, no one has the right to obtain, disclose or use this software in any way.
*/

package ecarx.xsf.notificationcenter.wrapper;

import android.os.RemoteException;

import ecarx.xsf.notificationcenter.interfaces.INotificationListener;
import ecarx.xsf.notificationcenter.notification.ICardNotificationListener;
import ecarx.xsf.notificationcenter.notification.INotificationBar;


public class MascotCardListenerWrapper extends ICardNotificationListener.Stub {

    private INotificationListener listener;

    public MascotCardListenerWrapper(INotificationListener listener){
        this.listener = listener;
    }

    @Override
    public void onNotificationPosted(INotificationBar notification) throws RemoteException {
        if (listener != null) {
            listener.onNotificationPosted(notification);
        }
    }

    @Override
    public void onNotificationRemoved(INotificationBar notification) throws RemoteException {
        if (listener != null){
            listener.onNotificationRemoved(notification);
        }
    }

    @Override
    public long getPushNotificationWaitingTime() throws RemoteException {
        if (listener != null){
            return listener.getPushNotificationWaitingTime();
        }
        return 0;
    }
}
